//
//  HelpViewController.m
//  Comma
//
//  Created by dlios on 15-1-13.
//  Copyright (c) 2015年 lanou3g.com 蓝鸥科技. All rights reserved.
//

#import "HelpViewController.h"
#import "HelpButtonView.h"
@interface HelpViewController ()

@end

@implementation HelpViewController
- (instancetype)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self) {
        
    }
    return self;
}
- (void)loadView
{
    [super loadView];
    self.helpView = [[HelpView alloc] initWithFrame:[UIScreen mainScreen].bounds];
    self.view = self.helpView;
    HelpButtonView * button = (HelpButtonView *)[self.helpView viewWithTag:101];
    self.helpView.choicedButtonTag = 101;
    [button selectChangeState:YES];
}
- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = [UIColor whiteColor];
        [self.helpView.backButton addTarget:self action:@selector(backButtonAction:) forControlEvents:UIControlEventTouchUpInside];
}
- (void)backButtonAction:(id)sender
{
    NSDictionary *dic = [NSDictionary dictionaryWithObjectsAndKeys:@"left", @"move", nil];
    [[NSNotificationCenter defaultCenter] postNotificationName:@"LINEA" object:nil userInfo:dic];
    
    [self.delegate helpControlMoveToOrigin];
    
    [self dismissViewControllerAnimated:YES completion:nil];
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
